<template>
	<view class="mask-open-screen-logo" v-if="isShowOpenScreenLogo">
		<image src="/static/index/welcome_logo.png" mode="widthFix"/>
	</view>
</template>

<script>
	import  { getNowPage } from '@/utils/str.js'
	export default {
		name:"pageBox",
		data() {
			return {
				modalInfo: null,
				isShowOpenScreenLogo: false
			};
		},
		mounted() {
			var npage = getNowPage()
			npage.box = this
			this.getHeight(npage)
			this._getOpenScreenLogoStatus()
		},
		methods:{
			getHeight(npage) {
				let menuButtonBoundingClientRect = uni.getMenuButtonBoundingClientRect()
				menuButtonBoundingClientRect.top + 44 - (44 - menuButtonBoundingClientRect.height) / 2
				npage.top = menuButtonBoundingClientRect * 2
			},
			showModal(e) {
				this.modalInfo = e
			},
			_getOpenScreenLogoStatus() {
				let npage = getNowPage()
				let isShowOpenScreenLogo = app.globalData.isShowOpenScreenLogo
				this.isShowOpenScreenLogo = isShowOpenScreenLogo
				if (typeof npage.getTabBar === 'function' && npage.getTabBar()) {
					npage.getTabBar().isHiddenTabBar = isShowOpenScreenLogo
				}
			},
			_closeOpenScreenLogo() {
				let npage = getNowPage()
				this.isShowOpenScreenLogo = false
				if (typeof npage.getTabBar === 'function' && npage.getTabBar()) {
					npage.getTabBar().isHiddenTabBar = false
				}
			}
		}
	}
</script>

<style>
.page-box-view {
  position: relative;
  z-index: 0;
}
.page-box-view .bg-view {
  position: fixed;
  z-index: -1;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  color: #fff;
  background-color: #041A37;
  background-repeat: repeat-y;
}
.page-box-view .bg-view.white {
  color: #333;
  background-color: #F7F7F7;
}
.login-view {
  margin-top: -250rpx;
  position: relative;
  width: 654rpx;
  background-color: #fff;
  padding: 24rpx 48rpx 48rpx;
  box-sizing: border-box;
  border-radius: 16rpx;
}
.login-view .title {
  text-align: center;
  font-size: 40rpx;
  font-weight: bold;
  color: #333333;
}

.login-view .hr {
  height: 2rpx;
  margin-top: 24rpx;
  background-color: #F5F5F5;
}

.login-view .img {
  width: 98rpx;
  height: 98rpx;
  margin: 30rpx auto 0;
}

.login-view .img-font{
  width: 456rpx;
  height: 34rpx;
  margin: 20rpx auto 0;
}

.login-view .bottom_font{
  width: 100%;
  height: 40rpx;
  font-size: 28rpx;
  text-align: center;
  color: #666666;
  margin-top: 24rpx;
  line-height: 40rpx;
}

.login-view .bottom_font .point{
  display: inline-block;
  background-color: #A7A6A7;
  width: 12rpx;
  height: 12rpx;
  border-radius: 50%;
  vertical-align: middle;
}

.login-view .btn-group {
  margin-top: 80rpx;
  display: flex;
  justify-content: space-between;
}
.login-view .btn-group .btn-config ,
.login-view .btn-group .btn-cancel {
  position: relative;
  overflow: hidden;
  width: 256rpx;
  height: 76rpx;
  line-height: 76rpx;
  text-align: center;
  background: #F2F2F2;
  font-weight: 500;
  border-radius: 10rpx;
  font-size: 34rpx;
  color: #fff;
}
.login-view .btn-group .btn-config {
  background-color: #07C160;
}
.login-view .btn-group .btn-cancel {
  color: #07C160;
}
.login-view .btn-group .ioverlap {
  width: 100%;
  opacity: 0;
}

.ioverlap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  opacity: 0;
}

.mask-open-screen-logo{
	width: 100vw;
	height: 100vh;
	position: fixed;
	top: 0;
	left: 0;
	background: #fff;
	z-index: 99999;
}
.mask-open-screen-logo image{
	width: 608rpx;
	height: 340rpx;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}
</style>